72418bee03c9faf45cf8ea30c6f5fc9bad44e012,app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java,DepictionGenerator,depict,#IReaction#,437

Before Change



        final List<Double> reactantScales = prepareCoords(reactants);
        final List<Double> productScales = prepareCoords(products);
        final List<Double> agentScales = prepareCoords(agents);

        // highlight parts
        for (Map.Entry<IChemObject, Color> e : myHighlight.entrySet())
            e.getKey().setProperty(StandardGenerator.HIGHLIGHT_COLOR, e.getValue());

        // setup the model scale based on bond length
        final double scale = this.caclModelScale(rxn);
        final DepictionGenerator copy = this.withParam(BasicSceneGenerator.Scale.class, scale);
        final RendererModel model = copy.getModel();

        // reactant/product/agent element generation, we number the reactants, then products then agents
        List<Bounds> reactantBounds = copy.generate(reactants, model, 1);
        List<Bounds> productBounds = copy.generate(toList(rxn.getProducts()), model, rxn.getReactantCount());
        List<Bounds> agentBounds = copy.generate(toList(rxn.getAgents()), model, rxn.getReactantCount() + rxn.getProductCount());

        // remove current highlight buffer
        for (IChemObject obj : myHighlight.keySet())
            obj.removeProperty(StandardGenerator.HIGHLIGHT_COLOR);

        // generate a 'plus' element
        Bounds plus = copy.generatePlusSymbol(scale, fgcol);

        // reset the coordinates to how they were before we invoked depict
        resetCoords(reactants, reactantScales);
        resetCoords(products, productScales);
        resetCoords(agents, agentScales);

        final Bounds emptyBounds = new Bounds();
        final Bounds title = copy.getParameterValue(BasicSceneGenerator.ShowReactionTitle.class) ? copy.generateTitle(rxn, scale) : emptyBounds;

After Change



        prepareCoords(reactants);
        prepareCoords(products);
        prepareCoords(agents);

        // highlight parts
        for (Map.Entry<IChemObject, Color> e : myHighlight.entrySet())